%chrname = (
189908151=>10,
189908152=>11,
189908153=>12,
189908154=>13,
189908155=>14,
189908156=>15,
189908157=>16,
189908158=>17,
189908159=>18,
189908160=>19,
189908150=>1,
189908162=>20,
189908163=>21,
189908164=>22,
189908165=>23,
189908166=>24,
189908167=>25,
189908161=>2,
189908168=>3,
189908169=>4,
189908170=>5,
189908171=>6,
189908172=>7,
189908173=>8,
189908174=>9
);
%chrlen = (
189908151=>42379582,
189908152=>44616367,
189908153=>47523734,
189908154=>53547397,
189908155=>56522864,
189908156=>46629432,
189908157=>53070661,
189908158=>52310423,
189908159=>49281368,
189908160=>46181231,
189908150=>56204684,
189908162=>56528676,
189908163=>46057314,
189908164=>38981829,
189908165=>46388020,
189908166=>40293347,
189908167=>32876240,
189908161=>54366722,
189908168=>62931207,
189908169=>42602441,
189908170=>70371393,
189908171=>59200669,
189908172=>70262009,
189908173=>56456705,
189908174=>51490918
);
$file=shift @ARGV;
open(F,$file);
while(<F>){
	chomp;
	@temp=split(/\|/,$_);
	@temp2=split(/\s+/,$_);
	$lenrat1=@temp2[8]/$chrlen{@temp[1]};
	$lenrat2=@temp2[9]/$chrlen{@temp[1]};
	$alnlen=abs(@temp2[8]-@temp2[9]);
	print "$_\t$chrname{@temp[1]}\t$chrlen{@temp[1]}\t$lenrat1\t$lenrat2\t$alnlen\n";
}
close F;
#foreach (keys %chrname) {
#$fileo="$file.$chrname{$_}.out";
#open(F.$chrname{$_},">$fileo");
#print F.$chrname{$_}"test";
#}

__END__


